﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;



namespace Command_
{


    [ServiceContract]
    interface ICommand
    {
        [OperationContract]
        CreateCurrencyResponse CreateCurrency(CreateCurrencyRequest request);

        [OperationContract]
        CreateRateResponse CreateRate(CreateRateRequest request);

    }



    [DataContract]
    public class CreateCurrencyRequest
    {
        [DataMember]
        public string Name { get; set; }
    }

    [DataContract]
    public class CreateRateRequest
    {
        [DataMember]
        public DateTime Period { get; set; }
        [DataMember]
        public string CurrencyName { get; set; }
        [DataMember]
        public double Value { get; set; }
    }



    public class BaseResponse
    {
        public ResponseStatus Status { get; set; }
    }

    public class CreateCurrencyResponse : BaseResponse
    {

    }

    public class CreateRateResponse : BaseResponse
    {

    }



    public enum ResponseStatus
    {
        OK,
        Error
    }

}
